package com.edbergogroup.springexamples.aop;

import com.edbergogroup.springexamples.aop.annotation.Monitorable;

public class MyServiceImpl implements MyServiceI {

	@Override
	public Integer multiply(Integer a, Integer b) {
		return a*b;
	}

	@Monitorable
	public void longRunningMethod(int iterations) {
		for (int i =0;i<iterations;i++){
			try {
				System.out.println("sleeping 1000ms...");
				Thread.sleep(1000);
				
			} catch (InterruptedException e) {
				// TODO Auto-generated catch block
				e.printStackTrace();
			}
		}
		
	}

	@Override
	public Integer multiply2(Integer a) {
		return a*a;
	}

}
